#include "basic_types.h"

int NextPowerOfTwo(int a)
{
	int rval=1;
	while(rval<a) rval<<=1;
	return rval;
}

KRotation::KRotation()
{
	mSinTheta = 0;
	mCosTheta = 1;
}

KRotation::KRotation(float degree)
{
	SetDegree(degree);
}

void KRotation::SetRadian(float radian)
{
	mSinTheta = sinf(radian);
	mCosTheta = cosf(radian);
}

void KRotation::SetDegree(float degree)
{
	SetRadian(degree * 3.1415926f / 180.0f);
}